function getxhr(){
	var xhr = false;
	if(window . XMLHttpRequest){
		xhr = new XMLHttpRequest();
	}else{
		xhr = window . ActiveXObject('Microsoft . XMLHttp');
	}
	return xhr;
}


function searchAttr(obj){
	
	var xhr = getxhr();
	var url = 'attribute.php?act=search&cat_id=' + obj.value;
	
	xhr.open('GET', url, true);
	
	xhr.onreadystatechange = function (){
		if(xhr.readyState == 4){
			//var attr_list = eval('(' + this.responseText + ')');
			
			$("table").html(this.responseText);
			
//			try{
//				var table = document.getElementById('table');
//				table . innerHTML = this.responseText;
//				document.body.appendChild(table);
//			}catch(e){
//				alert(e);
//			}
			
		}
	}
	xhr.send(null);
	
}












